package com.kakarote.examine.entity.PO;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 审批委托表
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wk_examine_delegate")
@ApiModel(value = "ExamineDelegate对象", description = "审批委托表")
public class ExamineDelegate implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "审核委托ID")
    @TableId(value = "delegate_id", type = IdType.ASSIGN_ID)
    private Long delegateId;

    @ApiModelProperty(value = "委托编号")
    private String number;

    @ApiModelProperty(value = "委托人ID")
    @NotNull(message = "委托人不能为空")
    private Long delegateUserId;

    @ApiModelProperty(value = "受托人ID")
    @NotNull(message = "受托人不能为空")
    private Long trusteeUserId;

    @ApiModelProperty(value = "业务模块 0oa  1合同 2回款 3发票 4 薪资 5 采购审核 6采购退款审核 7 销售退款 9付款单退款审核 9 付款单审核 10回款单审核 11盘店审核 12调拨审核 20阶段审批")
    @NotNull(message = "业务模块不能为空")
    private String labels;

    @ApiModelProperty(value = "开始时间")
    @NotNull(message = "开始时间不能为空")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @NotNull(message = "结束时间不能为空")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "是否启用 1 启用 0 禁用")
    private Integer state;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "用户ID")
    @TableField(fill = FieldFill.INSERT)
    private Long createUserId;


    @ApiModelProperty(value = "修改人ID")
    @TableField(fill = FieldFill.UPDATE)
    private Long updateUserId;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;


    @ApiModelProperty(value = "创建人")
    @TableField(exist = false)
    private String createUser;

    @ApiModelProperty(value = "委托人")
    @TableField(exist = false)
    private String delegateUser;

    @ApiModelProperty(value = "受托人")
    @TableField(exist = false)
    private String trusteeUser;

}
